import React from 'react';
import { Route, Switch } from 'react-router';
import { PermissionRoute, NoMatch } from '@choerodon/master';

import ContentIndex from './ContentIndex';

const WorkGroupIndex = ({ match }: any) => (
  <Switch>
    <PermissionRoute
      exact
      path={match.url}
      component={ContentIndex}
      service={['choerodon.code.organization.manager.work-group.default']}
    />
    <Route path="*" component={NoMatch} />
  </Switch>
);

export default WorkGroupIndex;
